<div class="ukefu-platform-content" style="overflow-y:hidden;">
	<div class="row" style="border-bottom: 1px solid #EFEFEF;padding:5px;">
		<div class="col-lg-12" style="padding-left:0px;position: relative;">
			<div class="ukefu-bt"> 
				<div class="layui-icon ukewo-btn ukefu-content-ind">
					<span class="user-webim-icon"><i class="layui-icon ukewo-btn" style="font-size:40px;">&#xe612;</i></span>
				</div>
				<div class="ukefu-crm-text">
					<div class="ukefu-user-index">
						<h1>
							${agentUser.username!''}
							<#if agentUser?? && agentUser.status=='end'>
							<span class="layui-badge layui-bg-gray">结束</span>
							<#elseif agentUser?? && agentUser.status=='inservice'>
							<span class="layui-badge layui-bg-blue">服务中</span>
							<#elseif agentUser?? && agentUser.status=='inquene'>
							<span class="layui-badge layui-bg-orange">排队中</span>
							</#if>
							<#if contacts??>（${contacts.name!''}）</#if>
						</h1>
						<div class="ukefu-join-time ukefu-text-muted" title="访问时间">
							<#if agentUser?? && agentUser.createtime??>${agentUser.createtime?string("yyyy-MM-dd HH:mm:ss")}</#if>123
						</div>
					</div>
					<!-- <div class="ukefu-bt-text-content" style="position: absolute;right: 5px;top: 0px;">
							<#if sessionConfig?? && sessionConfig.satisfaction == true>
								<#if curAgentService?? && curAgentService.invite?? && curAgentService.invite == true>
								已邀请
								<#elseif curAgentService?? && curAgentService.satisfaction?? && curAgentService.satisfaction == true>
								已评价
								<#else>
								<a href="/agent/statf.html?userid=${curagentuser.userid!''}&agentserviceid=${curagentuser.agentserviceid!''}&id=${curagentuser.id}" data-toggle="load" data-target="#ukefu-chat-agent"><button class="layui-btn layui-btn-sm"><i class="layui-icon">&#xe600;</i>邀请评价</button></a>
								</#if>
							</#if>
							<a href="/agent/summary.html?userid=${curagentuser.userid!''}&agentserviceid=${curagentuser.agentserviceid!''}&agentuserid=${curagentuser.id}&monitor=1" data-toggle="ajax" data-width="950" data-height="500" title="新建服务小结"><button class="layui-btn layui-btn-sm"><i class="kfont">&#xe65c;</i>服务小结</button></a>
							<a href="/agent/transfer.html?userid=${curagentuser.userid!''}&agentserviceid=${curagentuser.agentserviceid!''}&agentuserid=${curagentuser.id}" data-toggle="ajax" data-width="950" data-height="550" title="选择转接对象"><button class="layui-btn layui-btn-sm"><i class="kfont">&#xe7be;</i>转接坐席</button></a>
							<a href="/apps/monitor/agent/end.html?userid=${curagentuser.id!''}" data-toggle="tip" data-title="请确认是否关闭和用户“<#if inviteData?? && inviteData.agentshowcontacts && curagentuser.name??>${curagentuser.name!''}<#else>${curagentuser.username!''}</#if>”的对话？"><button class="layui-btn layui-btn-sm layui-btn-danger"><i class="kfont">&#xe621;</i> 结束对话</button></a>
					</div> -->
				</div>
			</div>
		</div>
	</div>
	<div class="row">
		<div class="col-lg-12">
			<div class="ukefu-crm-summary"> 
				<div class="row">
					<div class="col-lg-12">
						<ul class="ukefu-crm-block">
							<li class="item ukefu-channel-tip">
								<div class="title">访客敏感词报警</div>
								<div class="content">
									${monitoragentuser.servicefrewords!''}次
								</div>
							</li>
							<#if sessionConfig?? && sessionConfig.responsetimeout>
							<li class="item">
								<div class="title">坐席回复时长</div>
								<div class="content">
								${monitoragentuser.agenttimeout!''}秒
							    </div>
							</li>
							</#if>
							<#if sessionConfig?? && sessionConfig.sestimeout>
							<li class="item">
								<div class="title">会话超时时长</div>
								<div class="content">
								${monitoragentuser.agentservicetimeout!''}秒
							    </div>
							</li>
							</#if>
							<#if sessionConfig?? && sessionConfig.satisfactions>
							<li class="item">
								<div class="title">满意度报警</div>
								<div class="content">
								${monitoragentuser.satisfactionalarms!''}次
							    </div>
							</li>
							</#if>
							<#if sessionConfig?? && sessionConfig.inquenetimeout>
							<li class="item">
								<div class="title">排队时长</div>
								<div class="content">
								<#if agentUser?? && agentUser.queuetime=="">
								0
								<#elseif agentUser??>
									<#if agentUser.servicetime=="" >${(.now?long-agentUser.queuetime?long)/1000}
									<#elseif agentUser.servicetime!="" && agentUser.servicetime gt agentUser.queuetime >${(agentUser.servicetime?long-agentUser.queuetime?long)/1000}
									<#else>0
									</#if>
								<#else>
								0
								</#if>
								秒
							    </div>
							</li>
							</#if>
							<#if sessionConfig?? && sessionConfig.agentinvalid>
							<li class="item">
								<div class="title">无效会话</div>
								<div class="content">
								<#if monitoragentuser?? && monitoragentuser.userasks == 0 && monitoragentuser.status=='end'>是<#else>否</#if>
							    </div>
							</li>
							</#if>
						</ul>
						<#if agentUser.channel?? && agentUser.channel == "webim">
								<#include "/apps/service/monitor/webim.html">
						<#elseif agentUser.channel?? && agentUser.channel == "weixin">
								<#include "/apps/service/monitor/weixin.html">
						</#if>
					</div>
				</div>
			</div>
		</div>
	</div>
	<h1 class="site-h1 ukefu-tab" style="height:26px;">
		<div class="ukefu-tab-title" style="margin-left:0px;">
			<ul class="tab-title" id="pbxHostTab">
				<li class="layui-this">会话详情</li>
			</ul>					
		</div>
	</h1>
	<div id="callCenterContent" style="height:calc(100% - 220px);overflow-y:auto;">
		<div class="row" style="height:100%;">
			<div class="col-lg-12" style="border-right:1px solid #e6e6e6;padding-right:0px;">
				<div id="chat_msg_list" class="chat-message chat_msg_list" style="width: 100%;">
                      <#if agentUserMessageList?? && agentUserMessageList.content??>
                          <#list agentUserMessageList.content?reverse as chatmessage>
                              <div class="clearfix chat-block">
                                  <div class="<#if (chatmessage.userid?? && chatmessage.userid == user.id) || (chatmessage.calltype?? && chatmessage.calltype == 'out')>chat-right<#else>chat-left</#if>">
                                      <img alt="" src="<#if chatmessage.userid?? && chatmessage.userid == user.id>/images/im/user.png<#else><#if curagentuser.headimgurl?? && curagentuser.headimgurl !=''>${curagentuser.headimgurl}<#else>/images/im/user.png</#if></#if>" style="width:45px;height:45px;" class="user-img">
                                      <div class="chat-message">
                                          <span class="user">${chatmessage.username!''}</span>
                                          <span class="time">${chatmessage.createtime!''}</span></div>
                                      <div class="<#if (chatmessage.userid?? && chatmessage.userid == user.id) || (chatmessage.calltype?? && chatmessage.calltype == 'out')>chatting-right<#else>chatting-left</#if>">
                                          <i class="userarrow"></i>
                                          <div class="chat-content">
                                              <#include "/apps/agent/media/message.html"></div>
                                      </div>
                                  </div>
                              </div>
                          </#list>
                          <#elseif curagentuser??>
                              <#if curagentuser.status?? && curagentuser.status=="end">
                                  <div class="clearfix chat-block connect-end" id="agentuser-curstatus">
                                      <span class="connect-message">用户“${curagentuser.username!''}”已经离开</span></div>
                                  <#else>
                                      <div class="clearfix chat-block connect-begin" id="agentuser-curstatus">
                                          <span class="connect-message">用户“${curagentuser.username!''}”开始对话</span></div>
                              </#if>
                      </#if>
                  </div>
				
			</div>	
		</div>
	</div>
</div>
<script language="javascript"> 		
	$('#pbxHostTab li').on("click" , function(){
		$('#pbxHostTab li').removeClass("layui-this");
		$(this).addClass("layui-this");
	});	
</script>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script type="text/javascript">
layui.use('element', function(){
	  var $ = layui.jquery
	  ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
	 
	});
layui.use(['form'], function(){
	 
	var form = layui.form;
	form.render(); //更新全部
	form.render('select');
	form.on('select(template)', function(data) {
		var actid = data.value;
		console.log(1);
		loadURL("/apps/qc/owner/template?templateid=" + data.value, "#templateindex");
	});
	
	form.on('submit(disable)', function(data){
		 $("#status").val("disable");
	});
});

</script>
